﻿#ifndef MEDIASERVER_H
#define MEDIASERVER_H

#include <QObject>
#include <QTcpServer>
#include <QList>
#include "mediasocket.h"

class MediaSocket;
class MediaServer : public QTcpServer
{
    Q_OBJECT
public:
    explicit MediaServer(QObject *parent = nullptr);
    static MediaServer& getInstance();
    void incomingConnection(qintptr handle);//有客户端连接就会触发此信号
    void tranData(QByteArray ba,QString id);//转发数据
signals:

private:
    QList<MediaSocket*> socklist;

};

#endif // MEDIASERVER_H
